package service;

import models.Compartment;
import models.Forest;
import models.Subcompartment;

public class ForestInfoService {

	public static Boolean createCompartment(Compartment compartment) {
		compartment.save();
		return true;
	}

	public static Boolean deleteCompartment(Compartment compartment) {
		compartment.delete();
		return true;
	}
	
	public static Compartment getCompartment(Compartment compartment) {
		return Compartment.getCompartment(compartment);
	}

	public static Boolean createForest(Forest forest) {
		forest.save();
		return true;
	}

	public static Boolean deleteForest(Forest forest) {
		forest.delete();
		return true;
	}
	
	public static Forest getForest(Forest forest) {
		return Forest.getForest(forest);
	}

	public static Boolean createSubcompartment(Subcompartment subcompartment) {
		subcompartment.save();
		return true;
	}

	public static Boolean deleteSubcompartment(Subcompartment subcompartment) {
		subcompartment.delete();
		return true;
	}
	
	public static Subcompartment getSubcompartment(Subcompartment subcompartment) {
		return Subcompartment.getSubcompartment(subcompartment);
	}
}
